<!DOCTYPE html>
<html class="search-page">
<head>
    <meta charset="UTF-8">
    <title>黄记煌在线点餐</title>
    <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, width=device-width"/>
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta http-equiv="Cache-Control" content="must-revalidate,no-cache">
    <link rel="stylesheet" href="style/style.css"/>
</head>
<body>
<section class="_pre">
    <!-- 搜索框 -->
    <header id="head_search_box">
        <div class="search_header">
            <a href="index.html" class="back search_back" id='search_back'></a>
            <div class="search">
                <form id="search_form" method="get" action='' target="_parent" onsubmit="return submit_search();">
                    <div class="text_box" name="list_search_text_box" onclick="return 1;">
                        <input id="_keyword" name="keyword" type="text" class="text" value=""/>
                    </div>
                    <input type="hidden" value="f9f5bb4304ecf3be8fea0bcf8cfa68b2" name="sid">
                    <input type="submit" value="" class="submit" id="list_search_submit">
                </form>
            </div>
            <a class="menu filtrate" name="list_go_filter">附加</a>
        </div>
    </header>
    <section id="suggest_box">
        <div class="search_list" style="display: none;"></div>
        <div class="shadow_box" style="display: none;"></div>
    </section>
    <div style="height:47px;" class="empty_div">&nbsp;</div>
    <section cite="0" id="hot_search" class="hot_search">
        <ul class="clearfix">

        </ul>
    </section>
    <p class="search_null">请输入正确的关键字,如:"牛肉"</p>
</section>
<section class="_next" style="display: none">
    <!-- 筛选 -->
    <header>
        <div class="new_header_2" id="filter_header">
            <a href="javascript:;" class="back" id="list_filter_back">
                <span>返回</span>
            </a>
            <h2>附件</h2>
        </div>
    </header>
    <section id="filter_content">
        <div class="filtrate_price" name="filter_price" onclick="return 1;">
            用餐时间<input type="number" id="lp" value="">&sim;
               <input type="number" id="hp" value="">点
        </div>
        <div class="filtrate_category" att_id="address">
            <a href="javascript:;" class="filtrate_category_a" name="filter_region_nav">
                请选择口味
                <span class="up_down">全部展开</span>
            </a>
        </div>
        <ul class="clearfix filtrate_address filtrate_list addr_item" id="filter_region_list">
            <li class="">
                <a href="javascript:;" cid="111">香辣微辣</a>
            </li>
            <li class="">
                <a href="javascript:;" cid="112">香辣中辣</a>
            </li>
            <li class="">
                <a href="javascript:;" cid="113" >香辣特辣</a>
            </li>
            <li class="">
                <a href="javascript:;" cid="114">麻辣微辣</a>
            </li>
            <li class="">
                <a href="javascript:;" cid="115">麻辣中辣</a>
            </li>
            <li class="">
                <a href="javascript:;" cid="116">麻辣特辣</a>
            </li>
        </ul>
        <div class="filtrate_has">
            <h2>其他条件：如不食用香菜等。</h2>
            <ul class="clearfix">
                <li id="displaySalesPromotion"onclick="return 1;" class="">
                    <label for="">不使用香菜</label>
                </li>
                <li id="displayOutlets" onclick="return 1;" class="">
                    <label for="">不食用芹菜</label>
                </li>
                <li id="displayDDSelf" onclick="return 1;" class="">
                    <label for="">不食用花椒</label>
                </li>
                <li id="hasStock" onclick="return 1;" class="on">
                    <label for="">不食用胡椒</label>
                </li>
                <li id="displayPreSell"onclick="return 1;" class="">
                    <label for="">不食用味精</label>
                </li>
                <li id="displayOverseas"onclick="return 1;" class="">
                    <label for="">不食用鸡精</label>
                </li>
            </ul>
        </div>
    </section>
    <div class="filtrate_wrap">
        <ul class="filtrate_btn clearfix">
            <li><a href="javascript:;" class="reset" id='clear_btn'>清空附加条件</a></li>
            <li><a href="javascript:;" class="submit" id='submit_btn'>确定</a></li>
        </ul>
    </div>
    <script>
        var hasFilter = 0;
    </script>
</section>
<section id="mix_search_div" style="display: none;">
    <header id="bd">
        <header class="con floatsearch">
            <div id="component_1434612"></div>
            <section class="mix_new_header">
                <a href="javascript:void(0)" class="mix_back"></a>
                <form id="index_search_form" method="get" action="search.php" target="_parent" onsubmit="return mix_submit_search();">
                    <div class="search">
                        <div class="text_box">
                            <input id="keyword" name="search" type="text" value="搜索" placeholder="搜索" class="keyword text" onkeydown="this.style.color='#404040';" maxlength="70" autocomplete="off">
                        </div>
                        <span class="mix_submit"></span>
                        <a href="javascript:void(0)" class="clear_input" id="clear_input" style="display: block;"></a>
                        <input type="hidden" value="0" name="cid" id="cid">
                        <input type="hidden" value="shop_id=123123123" name="sid">
                    </div>
                    <input type="submit" value="搜索" class="mix_filtrate">
                </form>
            </section>
            <section class="mix_search_list"></section>
            <section class="mix_recently_search">
                <h3>搜索历史</h3>
                <ul>
                </ul>
                <a href="javascript:void(0)" onclick="clearRecently()" class="clear_recently_search">
                    <img src="images/delete_icon.png" alt="" width="15" height="15">
                    &nbsp;清空历史记录
                </a>
            </section>
            <div class="spacer"></div>
        </header>
    </header>
</section>
<script src="script/zepto.min.js" type="text/javascript"></script>
<script src="script/search/fx.min.js" type="text/javascript"></script>
<script src="script/search/fx_methods.min.js" type="text/javascript"></script>
<script src="script/search/zepto.lazyload.min.js" type="text/javascript"></script>
<script src="script/search/zepto_cokie.min.js" type="text/javascript"></script>
<script src="script/common.min.js" type="text/javascript"></script>
<script src="script/search/search.min.js" type="text/javascript"></script>
<script src="script/search/filter.min.js" type="text/javascript"></script>
<script src="script/search/mix_suggest.min.js" type="text/javascript"></script>
<script>
    var sid = "shop_id=123123123";
    $(document).ready(function () {
        $("img[data-original]").lazyload();
        $.extend(m_collect, {
            mdd_token: '',
            search_login_url: 'shop_id=123123123'
        });
        var fromType = location.href.indexOf("") > 0 ? 'search' : 'category';
        $.extend(m_loadMore, {
            p: '{"keyword":"0","act":"get_more","from":"' + fromType + '","cid":"0","sid":"' + sid + '","page":1}',
            big_pic_class: "",
            type: 1
        });
        m_loadMore.init();
        var filtrate = $(".filtrate"), submit = $(".submit,.back");
        filtrate.bind("click", function () {
            $("._next").css({"display": "block"});
            $("._pre").hide();
            window.scrollTo(0, 0);
        });
        submit.bind("click", function () {
            $("._next").hide();
            $("._pre").css({"display": "block"});
        });
        bizFilter.init();
        $("#backtop").click(function () {
            window.scrollTo(0, 0);
        });
    });
</script>
<script>
    $(function () {
        var sbox = $("#head_search_box"),
                sort = $('#product_sort'),
                related = $("#hot_search"),
                g_list = $("#goods_list"),
                g_m1 = "0", g_m2 = "90px";
        var initCss = function (type) {
            if (type == 1) {
                sort.css({"position": "static", "width": "100%"});
                g_list.css("margin-top", g_m1);
            } else {
                sort.attr("style", "");
                g_list.css("margin-top", g_m2);
            }
        };
        var m = {
            input: $("#_keyword"),
            rawAll: '',
            dd: $(".text_box"),
            cancel: $(".mix_back"),
            rawKey: 'r',
            main: function () {
                this.init();
                this.be();
            },
            init: function () {
                this.rawAll = this.input.val();
            },
            be: function () {
                var _this = this;
                this.input.focus(function () {
                    var mix_search = $("#mix_search_div");
                    if (mix_search.length > 0) {
                        _this.dd.trigger("click");  //for ddclick
                        $("._pre").hide();
                        mix_search.show();
                        $("#keyword").val(_this.rawKey).focus();
                        return;
                    }
                    var newKey = _this.input.val();
                    if (newKey != _this.rawKey && newKey != _this.rawAll) {
                        $(this).val(newKey);
                    } else {
                        $(this).val(_this.rawKey);
                    }
                    if ($(window).scrollTop() > 0) {
                        initCss(1);
                        window.scrollTo(0, 0);
                        _this.dd.trigger("click");
                    }
                }).blur(function () {
                    var newKey = _this.input.val();
                    if (newKey === _this.rawKey) {
                        $(this).val(_this.rawAll);
                    } else {
                        $(this).val(newKey);
                    }
                });
                this.cancel.bind("click", function () {
                    $("#mix_search_div").hide();
                    $("._pre").show();
                });
            }
        };
        m.main();
        $(window).resize(function () {
            sbox.css("width", "100%");
            sort.css("width", "100%");
        });

        setTimeout(function () {
            var sboxH = sbox.height();
            var relatedH = related.height();
            relatedH <= 20 && related.remove();
            var sortH = sort.height();
            var sortStart = sort.offset().top - sboxH;
            var showEnd = sort.offset().top;
            var init = function () {
                sbox.css({"position": "fixed", "top": "0"});
                window.scrollTo(0, 0);
            };
            var rawScroll = 0, nowScroll = 0;
            var upOrDown = function () {
                var delta = 30;
                if (nowScroll > rawScroll + delta) {
                    return 1;
                } else if (nowScroll < rawScroll - delta) {
                    return 2;
                } else {
                    return 0;
                }
            };
            var sticky = function () {
                nowScroll = $(window).scrollTop();
                if (nowScroll >= sortStart) {
                    sort.css({"position": "fixed", "top": sboxH});
                    g_list.css({"margin-top": sortH});
                } else {
                    sort.attr("style", "");
                    g_list.attr("style", "");
                }
                if (nowScroll > showEnd + sortH) {
                    var up = upOrDown();
                    if (up == 1) {
                        if (sbox.css("display") != "none") {
                            sbox.hide();
                            sort.hide();
                        }
                        rawScroll = nowScroll;
                    } else if (up == 2) {
                        if (sbox.css("display") == "none") {
                            sbox.show();
                            sort.show();
                        }
                        rawScroll = nowScroll;
                    }
                } else {
                    if (sbox.css("display") == "none") {
                        sbox.show();
                        sort.show();
                    }
                }
            };
            init();
            $(document).on("touchmove", sticky);
            $(window).on("scroll", sticky);
        }, 500);
    });
</script>
<script src="script/search/js_tracker.js" type="text/javascript"></script>
</body>
</html>